﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div class="cat-item1">
                <div id="smoothmenu" class="ddsmoothmenu-v">
        <ul>           
            <%List<Category> categoryList = (List<Category>)ViewData["FooterMenu"];
                foreach (Category category in categoryList)
                {%>
            <li><a href="<%=FRouter._("danhmuc",category.ID.ToString(),category.CategoryName) %>">
                <%=HttpUtility.HtmlEncode(category.CategoryName) %></a>
                <% 
                    //List<Category> subList = catDao.GetChildListByParentId(category.ID);
                    if (category.Categories.Count > 0)
                    {%>
                        <ul>
                      <%
                        foreach (Category catsub in category.Categories)
                        {%>
                            <li><a href="<%=FRouter._("danhmuc",catsub.ID.ToString(),catsub.CategoryName) %>">
                            <%=HttpUtility.HtmlEncode(catsub.CategoryName)%></a></li>
                            
                        <%} %>  
                        </ul>
                    <%
                    }
                       
                %>
            </li>
            <% }
            %>
            
        </ul>
    </div>
</div>
  <script src="../../Scripts/Menu/ddsmoothmenu.js" type="text/javascript"></script>
    <link href="../../Scripts/Menu/ddsmoothmenu-v.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/Menu/ddsmoothmenu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    jQuery(document).ready(function () {
        ddsmoothmenu.init({
            mainmenuid: "smoothmenu",
            orientation: 'v',
            classname: 'ddsmoothmenu-v',
            contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
        });
    });    
</script>